package com.financing.platform.dao.impl;

import java.sql.SQLException;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.financing.platform.dao.IFpFaTotalDao;
import com.financing.platform.dto.FpFaTotalDTO;
import com.financing.platform.util.SqlName;

/**
 * fp_fa_total  
 *  数据访问层实现类
 * @author huqiyun
 *
 */
 
@Repository("fpFaTotalDao")
public class FpFaTotalDaoImpl extends BaseDaoImpl implements IFpFaTotalDao {


	@Override
	public int insert(FpFaTotalDTO fpFaTotal) throws SQLException {
		return (Integer) this.sqlMapClient.insert(SqlName.FpFaTotalSql.insert, fpFaTotal);
	}

	@Override
	public void update(FpFaTotalDTO fpFaTotal) throws SQLException {
		this.sqlMapClient.update(SqlName.FpFaTotalSql.update, fpFaTotal);
	}

	@Override
	public void updateForce(FpFaTotalDTO fpFaTotal) throws SQLException {
		this.sqlMapClient.update(SqlName.FpFaTotalSql.updateForce, fpFaTotal);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		this.sqlMapClient.delete(SqlName.FpFaTotalSql.delete,id);
	}
	
	@SuppressWarnings("unchecked")	
	@Override
	public List<FpFaTotalDTO> queryList(FpFaTotalDTO fpFaTotal) throws SQLException {
		return this.sqlMapClient.queryForList(SqlName.FpFaTotalSql.queryList, fpFaTotal);
	}

	@Override
	public int queryListCount(FpFaTotalDTO fpFaTotal) throws SQLException {
		return (Integer) this.sqlMapClient.queryForObject(SqlName.FpFaTotalSql.queryListCount, fpFaTotal);
	}

	@Override
	public FpFaTotalDTO loadById(Integer id) throws SQLException {
		return  (FpFaTotalDTO)this.sqlMapClient.queryForObject(SqlName.FpFaTotalSql.loadById,id);
	}

 	
}
